//引入
//let s1:{no:string,name:string,age:number,telephone:string,address:string}={no:'s1001',name:'张三',age:23,telephone:'13323232322',address:'凤城二路第五国际A座'}
//let s2:{no:string,name:string,age:number,telephone:string,address:string}={no:'s1002',name:'李四',age:25,telephone:'13323232321',address:'凤城二路第五国际B座'}
//针对与如上的操作，ts提供了接口，用来定义新的类型
/*
    1、语法的定义:
    interface 接口名称{
        属性名:属性类型;
        属性名2:属性类型2
    }
    注意：接口的名称首字母大写，符合驼峰命名法
    由于所有的编程语言只提供了基本数据类型（string,number,boolean,object）
    接口是定义一种新的类型
    2、接口的特征
*/
// import Student from './type/Student'
// import Teahcer from './type/Teacher'
import Person from './type/Person'
// let s1:Student={no:'s1001',name:'张三',qq:'323232323',age:23,telephone:'13323232322',address:'凤城二路第五国际A座'}
// let s2:Student={no:'s1002',name:'李四',age:25,telephone:'13323232321',address:'凤城二路第五国际B座'}

// console.log(s1);
// //更改s1学生的地址
// s1.address="高新1路100号"
// //s1.name="张三丰"
// console.log(s1);

// let t1:Teahcer={no:'t1001',name:'翟吉喆',qq:'387898787',age:33,telephone:'13323332333',address:'保密'}



let s1: Person = { no: 's1001', name: '张三',age: 23, contact:{ qq: '323232323',telephone: '13323232322', address: '凤城二路第五国际A座'},hobby:['打篮球','游泳'] }
let t1: Person = { no: 't1001', name: '翟吉喆', age: 33,contact:{ qq: '387898787',telephone: '13323332333', address: '保密'},1:16 }
